home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Games of Daze
/
Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso
/
x2ftp
/
msdos
/
docs
/
ms_arcad
/
arc4_4.chp
< prev
next >
Wrap
Text File
|
1993-06-15
|
3KB
|
85 lines
%
#EF
#T15,1,Chapter 4 Animation Pg. 9
#HS,1,4,80,25,11,1
#C4,R5
~Y~I
~W~IMoving The World~Y~I
When writing 3D simulations, the ~R~Iworld~Y~I that the simulation moves in is
defined as sets of points in |3D space|. Each object in the world is composed
of ~C~Icollections of individual shapes~Y~I. Every shape is defined by its corners
or ~M~Ivertices.~Y~I
#WN
#C4,R13
The object in Figure 4.3 on the next screen is a good example. The book in
the figure is defined in 3D coordinates as a collection of six rectangles,
each rectangle making up one surface of the book. To define the book in
3-space, we have defined the eight vertices ~S(0,0,0) (0,0,5) (10,0,0)
(10,0,5) (0,20,0) (0,20,5) (10,20,0) (10,20,5).~s
#WN
#Uarc4_4.exe
%
#EF
#T15,1,Chapter 4 Animation Pg. 10
#HS,1,4,80,25,11,1
#C4,R5
~Y~I
The book can be moved (~M~Itranslated~Y~I), turned (~R~Irotated~Y~I), or ~C~Iscaled ~Y~Ijust by
~Kshifting the vertices around. If we want to look at the book from a
different angle, what we actually do is to ~W~Imove the book, not ourselves.~Y~I~k
#WN
An entire landscape can be simulated in the same manner. Each mountain,
valley, car, or building in the landscape is a collection of arbitrary
shapes called ~W~Ipolygons~Y~I. Each polygon is a surface composed of a
collection of points that define its vertices. The polygons are grouped
together into a single object, called a ~W~Isegment~Y~I. The book in Figure 4.3
demonstrated this. Each surface of the book is a polygon. All of the
polygons together make up a single segment. The segment itself represents
an object.
#WN
In a landscape, all of the polygons that make up the ground would be part
of the same segment. Each mountain would be a segment with possibly hundreds
of polygons in it. A car would also be a segment.
#WN
#QQ,R,2
A polygon is a group of ------ in
3D space.
A polygon is a group of points.
points,point,vertex,vertices
#WP
%
#EF
#T15,1,Chapter 4 Animation Pg. 11
#HS,1,4,80,25,11,1
#C4,R5
~Y~I
It's also possible to put ~C~Isegments in segments~Y~I. In high-powered programs it
is often necessary. All of the polygons of a car door could be put into a
single segment. The segment that makes up the door could then be included in
the segment that makes up the car, along with the other polygons and
segments that the car is composed of. In this way, we can build objects that
are extremely complicated.
#WN
As ~G~Iwe move ~Y~Ithrough a landscape, ~G~Iour point of view ~G~Irelative to the landscape
~G~Ichanges~Y~I. In other words, a scene looks different if we look at it from
different spots or different angles. In the real world, you and I move
through the landscape. In computerized simulations, ~R~Iwe move the landscape
to accommodate us~Y~I. ~W~I~FThe world literally revolves around us.~Y~I~N
#WN
If the world is moved fast enough, it appears to the viewer as if he/she is
moving through the scene. This is exactly how flight simulator programs
work.
#WN
With this overview of animation, we're almost ready to begin writing games.
#WP
#X